class xT_AICommand_Cmd_Turn extends xT_AICommand_Cmd;

var private Vector                      NewRotationPoint;

//=============================================================================
// State
//=============================================================================
AUTO state Turn
{
Begin:
	//`log("xT_AICommand_Turn executed");
	if (IsZero(NewRotationPoint))
	{
		Sleep(WorldInfo.DeltaSeconds);
		Goto('Begin');
	}


Turning:
	SetFocalPoint(NewRotationPoint);
	FinishRotation(); // Wait while turning

	PopCommand(Self);
}

//=============================================================================
// Turn Point
//=============================================================================
function SetTurnPoint(vector aTurnToNewLocation)
{
	NewRotationPoint = aTurnToNewLocation;
}

//=============================================================================
// DefaultProperties
//=============================================================================
defaultproperties
{
}
